home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-01-14 | 1.6 KB | 59 lines | [TEXT/MPS ] |
- /* _________________________________________________________________________________________________________ //
- Copyright © 1992-93 Apple Computer, Inc. All rights reserved.
- Macintosh Developer Technical Support.C++ Macintosh Toolbox Framework.
- Programmer: Kent Sandvik
- Date: 12/14/92
- Revision comments are at the end of this file.
- ---
- TSpinCursor is a simple cursor spinning class.
- SpinCursorTest.cp contains the TSpinCursor test functions.
- _________________________________________________________________________________________________________ */
-
- #include "SpinCursor.h"
-
- // This program will sping 20 times forwards and 20 time backwards.
- // Don't forget to include the SpinCursor.r resources when you test
- // the program.
-
- const long kSpins = 20; // # spins
- const short kWatchID = 6500; // acur resource ID
- const short kDelayTime = 20; // delay between spins
-
- void main(void)
- {
- cout << "Start of TSpinCursor test…\n";
-
- // Create TSpinCursor object.
- TSpinCursor mySpin(kWatchID);
-
- // Spin forwards.
- cout << "First forwards…\n";
- for (long ticking = 0; ticking < kSpins; ticking++)
- {
- ::Delay(kDelayTime, NULL);
- mySpin.Spin();
- }
-
- // Change directions.
- mySpin.SetSpinDirection(TSpinCursor::kBackwards);
-
- // Spin backwards.
- cout << "Then backwards…\n";
- for (ticking = 0; ticking < kSpins; ticking++)
- {
- ::Delay(kDelayTime, NULL);
- mySpin.Spin();
- }
-
- cout << "End of the TSpinCursor test!\n";
- }
-
- // _________________________________________________________________________________________________________ //
-
-
- /* Change History (most recent last):
- No Init. Date Comment
- 1 khs 12/14/92 New file
- 2 khs 1/3/93 Cleanup
- */
-